#!/bin/bash

echo "[Pre-Requirement] Makesure install JDK 6.0+ and set the JAVA_HOME."
echo "[Pre-Requirement] Makesure install Maven 3.0.3+ and set the PATH."
	
set MAVEN_OPTS=$MAVEN_OPTS -XX:MaxPermSize=128m

echo "[Step 1] Install all bsl-push modules to local maven repository."
mvn clean install -Dmaven.test.skip=true

echo "[Step 2] Start push-server and push-web."
cd  push-server
mvn clean jetty:run -Djetty.port=18861 &
cd  ../push-console
mvn clean jetty:run &

echo "[INFO] Please wait a moment then access below demo sites:"
echo "[INFO] http://localhost:18861/push-server"
echo "[INFO] http://localhost:8080/push-console"

